<!--SIF Implementation Specification 2.2-6 (March 17, 2008)-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" targetNamespace="http://www.sifinfo.org/infrastructure/2.x" xmlns:sif="http://www.sifinfo.org/infrastructure/2.x" elementFormDefault="qualified">
  <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="imports/xml/xml.xsd" />
  <xs:complexType name="StudentLocatorType">
    <xs:annotation>
      <xs:documentation>This object provides a mechanism for requesting and updating state student identifiers.  While communicated using SIF's request/response
							model, this object is an exception case in terms of how it interacts especially with SIF's query mechanisms (e.g. one wouldn't request
							certain elements be returned from StudentLocator).
							The use of this object is dictated by external use cases and best practices.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="StateProvinceId" minOccurs="0" type="sif:StateProvinceIdType">
        <xs:annotation>
          <xs:documentation>This is the student's state-assigned ID. May be empty in a response where IdStatus is "Ambiguous."</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Confidence" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:documentation>Confidence score. The main use of this element is when IdStatus equals "Ambiguous" and the state returns one or more* candidate matches. The interpretation is that the information populated in each returned object matches the information in the request to the extent expressed in this score. The matching/scoring algorithms (and resultant values) are defined by the particular state.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="LocalId" minOccurs="0" nillable="true" type="sif:LocalIdType">
        <xs:annotation>
          <xs:documentation>This is the requesting agency's unique ID for the student.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="StudentPersonalRefId" minOccurs="0" nillable="true" type="sif:IdRefType">
        <xs:annotation>
          <xs:documentation>Requesting agency's local zone GUID of the student's StudentPersonal object.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="RequestingAgencyId" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>Identification of the agency and/or location requesting the state ID. Optional because the SIF Zone infrastructure may provide adequate information for the state to ascertain the origin of the request.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:simpleContent>
            <xs:extension base="xs:normalizedString">
              <xs:attribute name="Type" use="required">
                <xs:annotation>
                  <xs:documentation>The functional level of the requesting agency.</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                  <xs:restriction base="xs:token">
                    <xs:enumeration value="ESA">
                      <xs:annotation>
                        <xs:documentation>Educational Services Agency</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="LEA">
                      <xs:annotation>
                        <xs:documentation>Local Educational Agency (District)</xs:documentation>
                      </xs:annotation>
                    </xs:enumeration>
                    <xs:enumeration value="School" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:attribute>
            </xs:extension>
          </xs:simpleContent>
        </xs:complexType>
      </xs:element>
      <xs:element name="GradeLevel" minOccurs="0" nillable="true" type="sif:GradeLevelType">
        <xs:annotation>
          <xs:documentation>The student's current grade level.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SSN" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:documentation>Social security number of the student.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Name" minOccurs="0" maxOccurs="unbounded" type="sif:NameType">
        <xs:annotation>
          <xs:documentation>The name(s) of the student.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Address" minOccurs="0" maxOccurs="unbounded" type="sif:AddressType">
        <xs:annotation>
          <xs:documentation>The address(es) of the student.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Demographics" minOccurs="0" nillable="true" type="sif:DemographicsType">
        <xs:annotation>
          <xs:documentation>Demographic information about the student. This will typically be the core matching information. Privacy considerations may mean that it is filled differently here than it might be in a local StudentPersonal, but it must include enough to drive the state's matching algorithms.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Contact" minOccurs="0" maxOccurs="unbounded">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Relationship" minOccurs="0" type="sif:RelationshipType">
              <xs:annotation>
                <xs:documentation>Relationship to the student.</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="Name" minOccurs="0" maxOccurs="unbounded" type="sif:NameType">
              <xs:annotation>
                <xs:documentation>The name(s) of the contact.</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="OtherId" minOccurs="0" nillable="true" type="sif:OtherIdType">
              <xs:annotation>
                <xs:documentation>An other ID associated with the contact.</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="EducationalLevel" minOccurs="0" nillable="true" type="sif:EducationalLevelType">
              <xs:annotation>
                <xs:documentation>Highest level of education completed by the contact.</xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="EffectiveDate" minOccurs="0" nillable="true" type="xs:date">
        <xs:annotation>
          <xs:documentation>For Requests, this should match StudentSchoolEnrollment/EntryDate.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="StartDate" minOccurs="0" nillable="true" type="xs:date">
        <xs:annotation>
          <xs:documentation>Begin date for a range that is being requested.  Note: In most cases this will correspond to the school entry date.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="EndDate" minOccurs="0" nillable="true" type="xs:date">
        <xs:annotation>
          <xs:documentation>End date for a range that is being requested.  Note: In most cases this will correspond to the school exit date.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="GraduationDate" minOccurs="0" nillable="true" type="sif:GraduationDateType">
        <xs:annotation>
          <xs:documentation>
								Indicates the date the student graduated—Year, Year and Month, or Year, Month and Day may be specified.
								Intended to facilitate locating students that may not be currently enrolled
								in a school or district, particularly in the context of locating student identifiers for initiating a request for a student's academic record.
								Supplied date values may often be approximations made by the entity endeavoring to request a student's academic record.
							</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SchoolAttendedName" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:documentation>The name of the school last attended by the student.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SchoolAttendedLocation" minOccurs="0" nillable="true" type="xs:normalizedString">
        <xs:annotation>
          <xs:documentation>The location of the school last attended by the student (e.g. city or county name, district name, etc.).</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="OtherId" minOccurs="0" nillable="true" type="sif:OtherIdType">
        <xs:annotation>
          <xs:documentation>Additional student identifier not represented elsewhere in StudentLocator (e.g. the driver's license number of the student).</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SIF_Error" minOccurs="0" nillable="true" type="sif:SIF_ErrorDataModelType">
        <xs:annotation>
          <xs:documentation>
								When IdStatus is set to Error, this element provides details about the error.  Rather than the specification
								defining a list of possible error categories and codes for StudentLocator transactions, the SIF_Category and SIF_Code elements may contain
								values defined by the application that is responding to the StudentLocator request.  It is recommended the requester convey these values
								in log files or error reports, along with the SIF_Desc and optional SIF_ExtendedDesc elements.
							</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SIF_Metadata" minOccurs="0" nillable="true" type="sif:SIF_MetadataType">
        <xs:annotation>
          <xs:documentation>
								SIF_Metadata/TimeElement may be specified as metadata of a StudentLocator SIF_Request to indicate a time duration to which
								the request parameters apply (as opposed to adding new elements to the StudentLocator object).  This metadata may be supplied by systems
								that know a student existed in a district during a certain time period (e.g. a system initiating a student record exchange).  If the responder
								is able to make use of the metadata, it may do so to narrow down the student look-up; otherwise the metadata can be ignored or logged.
							</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SIF_ExtendedElements" minOccurs="0" nillable="true" type="sif:SIF_ExtendedElementsType" />
    </xs:sequence>
    <xs:attribute name="IdStatus" use="required">
      <xs:annotation>
        <xs:documentation>Communicates the orchestration status for the object.</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:restriction base="xs:token">
          <xs:enumeration value="Request" />
          <xs:enumeration value="Release" />
          <xs:enumeration value="Valid" />
          <xs:enumeration value="Ambiguous" />
          <xs:enumeration value="Resolve" />
          <xs:enumeration value="New" />
          <xs:enumeration value="Cancel" />
          <xs:enumeration value="Cancelled" />
          <xs:enumeration value="Error" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="TransactionId" use="required" type="sif:GUIDType">
      <xs:annotation>
        <xs:documentation>
								GUID that allows requesters and responders to refer to the same logical StudentLocator "transaction" over more than one
								SIF_Request/SIF_Response exchange.
							</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>

  <xs:element name="StudentLocator" type="sif:StudentLocatorType" />

</xs:schema>